package com.oracle.cmp.service;

import com.oracle.cmp.entity.Code;
import com.oracle.jdbc.util.Dao;

import java.util.List;

public class CodeServiceImpl implements CodeService{
    @Override
    public List<Code> queryAll(String type) {
        String sql="select code,name from sys_code where type=? and code not in(1)";
        return Dao.query(sql,Code.class,type);
    }

    @Override
    public List<Code> query(String type) {
        String sql="select * from sys_code where type=? ";
        return Dao.query(sql,Code.class,type);
    }


}
